package com.vpen.payment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vpen.commons.pojo.Payment;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


/**
 * -@Version 1.0
 * -@Author:Vpen
 * -@Date:2021/3/16 17:07
 * -@Content:
 */
@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {
    /**
     * 根据id查询
     * @author 韦鹏
     * @name selectPaymentById
     * @date 2021/8/7 21:18
     * @param id
     * @return com.vpen.commons.pojo.Payment
     **/
    @Select("select * from payment where payment_id=#{id}")
    @Results(id = "selectPaymentById", value = {
            @Result(id = true, column = "payment_id", property = "id"),
            @Result(column = "payment_serial", property = "serial")
    })
    Payment selectPaymentById(@Param("id") Integer id);
}
